-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lazy load image support for Next theme. #2587
Conversation
Update from original.
This add compare fir `lazy` classname and if it true, will add 'data-original' attrubute to replace it with `src` attrubute, to make image load lazy. If no `lazy` class defined, image tag will work at standart state.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix the errors in Travis-ci and add test cases.
Moreover, could this change be more generic, like based on config file?
I not sure how do it. Can u show?
What are u mean? Need to write something like docs or what? |
@NoahDragon all possible errors was fixed. |
@ivan-nginx Sorry for the late reply. I missed this PR in the pile of notifications. IMO, the string |
@NoahDragon lazy load path — it's good idea, ok. But lazy load class? This is to big and how about speed generation? For this little option add many other cases? Can u show me how add test cases? I don't add any cases before. |
@ivan-nginx Could you please follow the samples in the test file https://github.com/hexojs/hexo/blob/master/test/scripts/tags/img.js . It's using the Mocha as the test framework, you could find more info on their website https://mochajs.org/. |
This issue has been automatically marked as stale because lack of recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
1 similar comment
This issue has been automatically marked as stale because lack of recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Thank you for creating a pull request to contribute to Hexo code! Before you open the request please review the following guidelines and tips to help it be more easily integrated: